package com.icinfo.cloud.provider.punish.fastcase.service;

import com.icinfo.cloud.provider.peripheralinterface.regulatory.vo.PunishItemVo;
import com.icinfo.cloud.provider.punish.config.vo.AreaVo;
import com.icinfo.cloud.provider.punish.config.vo.ConfigFastProcedureDocumentInfoVo;
import com.icinfo.cloud.provider.punish.config.vo.ConfigFastProcedureVo;
import com.icinfo.cloud.provider.punish.dto.CaseAppendixDeleteDto;
import com.icinfo.cloud.provider.punish.dto.CaseDocumentRecordSignSaveDto;
import com.icinfo.cloud.provider.punish.fasecase.dto.FastNoticeDocumentDto;
import com.icinfo.cloud.provider.punish.fastcase.dto.*;
import com.icinfo.cloud.provider.punish.fastcase.vo.*;
import com.icinfo.cloud.provider.punish.ucase.casemain.dto.CaseDocumentRecordDto;
import com.icinfo.cloud.provider.punish.ucase.casemain.vo.CaseCurrentLinkMoreOperateVo;
import com.icinfo.cloud.provider.punish.ucase.casemain.vo.CaseCurrentLinkOperateVo;
import com.icinfo.cloud.provider.punish.ucase.casemain.vo.CaseDocumentRecordVo;
import com.icinfo.cloud.provider.punish.ucase.caseregister.dto.CaseRegisterDetailQueryDto;
import com.icinfo.cloud.provider.punish.ucase.caseregister.dto.CaseRegisterSaveDto;
import com.icinfo.cloud.provider.punish.ucase.caseregister.vo.CaseRegisterInfoVo;
import com.icinfo.cloud.provider.punish.ucase.caseregister.vo.CaseRegisterSaveVo;
import com.icinfo.cloud.provider.punish.ucase.punishinform.dto.FastCaseAddInfoTemporaryDto;
import com.icinfo.cloud.provider.punish.ucase.punishinform.dto.InformHtmlRequest;
import com.icinfo.cloud.provider.punish.ucase.punishinform.dto.PunishInformFormDto;
import com.icinfo.cloud.provider.punish.ucase.punishinform.vo.PunishInformFormVo;
import com.icinfo.cloud.provider.punish.vo.AppInvalidCaseDetailDocumentInfoVo;
import com.icinfo.cloud.provider.punish.vo.ConfigPoliceAdjudicationVo;
import com.icinfo.framework.common.web.Result;

import java.util.List;

/**
 * @Description 简案快办对应的Service接口
 * @Author WangJie
 * @Date 2022/12/05
 **/
public interface IFastCaseService {

    /**
     * 描述：附件上传通用方法
     *
     * @param saveDto 保存dto
     * @return boolean
     * @author WangJie
     * @date 2022/12/05
     */
    boolean saveAppFastCaseFileCommon(AppFastCaseCommonFileSaveDto saveDto);

    /**
     * 描述：根据caseId获取关联附件列表
     * @param caseId
     * @return List<FastCaseFileCommonInfoVo>
     * @author WangJie
     * @date 2022/12/05
     */
    List<AppFastCaseFileCommonInfoVo> getAppFastCaseFileCommonListByCaseId(String caseId);

    /**
     * 描述：根据caseId获取需要签字的文书记录
     * @param caseId
     * @return List<AppFastCaseDocumentVo>
     * @author WangJie
     * @date 2022/12/05
     */
    List<AppFastCaseDocumentVo> getAppFastCaseSignDocumentListByCaseId(String caseId);

    /**
     * 移动端简案快办-接收文书签字捺印列表数据
     *
     * @param saveDto
     * @return Result
     * @author WangJie
     * @date 2022/12/05
     */
    Result receiveSignFileList(AppFastCaseSignSaveDto saveDto);

    /**
     * 【V1.10.0】描述：移动端简案快办-速结程序同意告知书 签名捺印
     *
     * @param saveDto
     * @return
     */
    CaseDocumentRecordDto receiveSignFileOfFastCaseAgreeDoc(CaseDocumentRecordSignSaveDto saveDto);

    /**
     * 【V1.10.0】描述：立案登记（多案由、多当事人）
     *
     * @return {@link Result }
     * @author cds
     * @param saveDto
     * @date 2022/12/15
     */
    Result saveCaseRegister(CaseRegisterSaveDto saveDto);

    /**
     * 【V1.10.0】描述：暂存立案登记（多案由、多当事人）
     *
     * @return {@link Result }
     * @author cds
     * @param saveDto
     * @date 2022/12/15
     */
    Result saveCaseRegisterTemporary(CaseRegisterSaveDto saveDto);

    /**
     * 【V1.10.0】描述：获取立案登记详情（多案由、多当事人）
     *
     * @param queryDto 查询dto
     * @return {@link Result< CaseRegisterInfoVo > }
     * @author cds
     * @date 2022/12/15
     */
    CaseRegisterInfoVo getCaseRegisterInfo(CaseRegisterDetailQueryDto queryDto);

    /**
     * 【V1.10.0】描述：速结告知书生成 并返回前端文书地址
     *
     * @param caseId
     * @return
     * @author cds
     * @date 2022/12/15
     */
    FastNoticeDocumentDto generateFastNoticeDocument(String caseId);

    /**
     * 获取处罚告知表单数据
     * @param request
     * @return
     */
    Result<PunishInformFormVo> getPunishInformFormBaseinfo(InformHtmlRequest request);

    /**
     * 保存处罚告知表单数据
     * @param dto
     * @return
     */
    Result<String> savePunishInformForm(PunishInformFormDto dto);

    /**
     * 【AJ-V1.1.1】描述： 速结程序转普通程序
     *
     * @author: zhengqiang
     * @date: 2023/3/10
     * @param: caseId
     * @return {@link Result}
     **/
    Result changeToNormalProcedure(String caseId);

    /**
     *【V1.4.1】描述：返回案件主流程当前环节的操作按钮-详情页底部，包括流程操作、下一步、更多操作
     * @param caseId
     * @return
     */
    Result<CaseCurrentLinkOperateVo> getCaseCurrentLinkOperate(String caseId);

    /**
     * 【V1.11.4】描述：根据处罚事项code查询文书模板
     * @param orgCode
     * @param listCode
     * @return: com.icinfo.framework.common.web.Result<com.icinfo.cloud.provider.punish.config.vo.ConfigFastProcedureVo>
     * @author sunjiefei
     * @date 2023-05-06
     */
    Result<ConfigFastProcedureVo> getTemplateByListCode(String orgCode, String listCode);


    /**
     * 【V1.11.4】描述： 修改移动端简案快办立案(处罚告知)相关文书
     *
     * @author: zhengqiang
     * @date: 2023/5/4
     * @param: modifyOfRegisterDto
     * @return {@link Result}
     **/
    Result modifyAppFastCaseRegisterDocuments(AppFastCaseDocumentModifyOfRegisterDto modifyOfRegisterDto);

    /**
     * 删除立案数据
     *
     * @param caseId 入参
     * @return {@link Result }
     * @author shishengyao
     * @date 2023/05/13
     */
    Result delCaseSaveMsg(String caseId);

    /**
     * 获取区划
     * @author lxj
     * @date  2022/3/21
     * @return
     **/
    Result<List<AreaVo>> getSysAreaList();
    /**
     * 描述：获取证据采集信息
     *
     * @param caseId 用例id
     * @return {@link FastCaseEvidenceCollectInfoVo }
     * @author shishengyao
     * @date 2023/08/16
     */
    Result<FastCaseEvidenceCollectInfoVo> getEvidenceCollectInfo(String caseId);

    /**
     * 描述：保存证据采集信息
     *
     * @param saveDto 保存dto
     * @return int
     * @author shishengyao
     * @date 2023/08/17
     */
    Result saveEvidenceCollectInfo(FastCaseEvidenceCollectInfoSaveDto saveDto);

    /**
     * 【V1.12.1】描述：简案快办立案登记
     *
     * @author: zhengqiang
     * @date: 2023/8/16
     * @param: saveDto
     * @return {@link Result<CaseRegisterSaveVo>}
     **/
    Result<CaseRegisterSaveVo> saveFastCaseRegister(FastCaseRegisterSaveDto saveDto);

    /**
     * 【V1.12.1】描述： 查询简案快办暂存数据
     *
     * @author: zhengqiang
     * @date: 2023/8/17
     * @param: queryDto
     * @return {@link Result<FastCaseRegisterInfoVo>}
     **/
    Result<FastCaseRegisterInfoVo> getFastCaseRegisterInfo(FastCaseRegisterInfoQueryDto queryDto);

    /**
     * 【V1.12.1】描述： 生成简案快办文书
     *
     * @author: zhengqiang
     * @date: 2023/8/17
     * @param: dto
     * @return {@link Result<FastCaseNoticeDocumentVo>}
     **/
    Result<FastCaseNoticeDocumentVo> getFastCaseNoticeDocument(FastCaseRegisterInfoQueryDto dto);

    /**
     * 【V1.12.1】描述： 快办告知步骤操作(上一步,下一步)
     *
     * @author: zhengqiang
     * @date: 2023/8/18
     * @param: operateDto
     * @return {@link Result}
     **/
    Result saveFastInformOperateStep(FastCaseRegisterOperateDto operateDto);

    /**
     * 【V1.12.1】描述： 查询简案快办提示
     *
     * @author: zhengqiang
     * @date: 2023/8/17
     * @param: queryDto
     * @return {@link Result<String>}
     **/
    Result<String> getFastTipsByListCodeAndOrgCode(FastTipsQueryDto queryDto);

    /**
     * 【V1.12.1】描述： 根据用户查询简案快办最新的一条暂存数据
     *
     * @author: zhengqiang
     * @date: 2023/8/18
     * @return {@link Result< AppFastCaseRegisterTempVo>}
     **/
    Result<AppFastCaseRegisterTempVo> getFastRegisterTempByUser();

    /**
     * 【V1.12.1】描述： 获取简案快办处罚事项
     *
     * @author: zhengqiang
     * @date: 2023/8/23
     * @param: orgCode
     * @return {@link Result<List< PunishItemVo>>}
     **/
    Result<List<PunishItemVo>> getFastAuditPubishTreeByOrgCode(String orgCode);

    /**
     * 【V1.12.1】描述： 获取自动结案提醒
     *
     * @author: zhengqiang
     * @date: 2023/8/23
     * @param: caseId
     * @return {@link FastAutoCloseCaseReminderVo}
     **/
    FastAutoCloseCaseReminderVo getAutoCloseCaseReminder(String caseId);

    /**
     * 【V1.12.1】 描述：简案快办保存调查结束
     *
     * @param fastCaseAddInfoDto
     * @return {@link Result<String> }
     * @author shishengyao
     * @date 2023/08/24
     */
    Result<String> saveInvestigateEnd(FastCaseFormSubmitAddInfoDto fastCaseAddInfoDto);

    /**
     * 【V1.12.1】  描述：简案快办调查终结暂存信息获取
     *
     * @param dto dto
     * @return {@link Result<FastCaseFormSubmitAddInfoDto> }
     * @author shishengyao
     * @date 2023/08/24
     */
    Result<FastCaseFormSubmitAddInfoDto> getInvestigateEndTemporary(FastCaseAddInfoTemporaryDto dto);

    /**
     * 【V1.12.1】描述：返回简案快办案件主流程当前环节的顶部按钮
     *
     * @author: zhengqiang
     * @date: 2023/8/25
     * @param: caseId
     * @return {@link Result< List< CaseCurrentLinkMoreOperateVo>>}
     **/
    Result<List<CaseCurrentLinkMoreOperateVo>> getAppFastCaseCurrentLinkOperate(String caseId);

    Result saveFastCaseAutoEnd(FastCaseAutoEndSaveDto saveDto);

    /**
     * 【V1.12.1】描述： 上传放弃陈述申辩文件（简案快办）
     *
     * @author: zhengqiang
     * @date: 2023/8/29
     * @param: saveDto
     * @return {@link Result< String>}
     **/
    Result<String> uploadWaiverPleaFile(AppWaiverPleaFileSaveDto saveDto);
    /**
     * 描述：保存证据采集信息
     *
     * @param orgCode  组织代码
     * @param listCode 代码列表
     * @param caseId   用例id
     * @return {@link Result<List<ConfigFastProcedureDocumentInfoVo>> }
     * @author shishengyao
     * @date 2023/09/04
     */
    Result<List<ConfigFastProcedureDocumentInfoVo>> getDocumentTemplateByListCode(String orgCode, String listCode,  String caseId);
    /**
     * 描述：删除证据
     * @param dto
     * @return int
     * @author shishengyao
     * @date 2023/09/06
     */
    Result<String> delEvidenceCollectInfo(FastCaseEvidenceCollectInfoDeleteDto dto);
    /**
     * 描述：案件撤回操作
     * @param @param caseId 案件id,caseLinkCode 案件环节编码
     * @date 2023/12/11
     */
    Result doRecallCaseHandleLink(String caseId, String caseLinkCode);

    /**
     * 查询是否符合听证条件
     **/
    Result<String> getIsNeedHearingResult(PunishInformFormDto punishInformFormDto);
    /**
     * 描述：查询撤回后废弃文书操作
     * @param caseId 案件id
     * @date 2023/12/11
     */
    Result<List<AppInvalidCaseDetailDocumentInfoVo>> getInvalidCaseDetailDocumentInfoList(String caseId);
    /**
     * 描述：附件操作
     * @param caseAppendixDeleteDto
     * @date 2023/12/11
     */
    Result<String> deleteCaseAttachmentInfo(CaseAppendixDeleteDto caseAppendixDeleteDto);

    Result<ConfigPoliceAdjudicationVo> getPoliceAdjudication(String itemRelationCode);
}
